const mongoose = require('mongoose');
//'mongodb://212.64.71.77:27017/test'
//'mongodb://192.168.0.109:27017/test'
//const db = require('./db/redis');
//mongoose.connect('mongodb://192.168.10.77:27017/test', {useNewUrlParser: true, useUnifiedTopology: true});


/* 腾讯轻量云-部署环境 */
//mongoose.connect('mongodb://admin:12dadtE43456@172.17.0.2:27017/test?authSource=admin',{useNewUrlParser: true, useUnifiedTopology: true})



/* 本地开发机测试环境 */
//  mongoose.connect('mongodb://admin:12dadtE43456@192.168.10.77:27017/test?authSource=admin',{useNewUrlParser: true, useUnifiedTopology: true})

/* 77,mongo本机docker地址 */
//mongoose.connect('mongodb://admin:12dadtE43456@172.17.0.5:27017/test?authSource=admin',{useNewUrlParser: true, useUnifiedTopology: true})

//mongoose.connect('mongodb://admin:12dadtE43456@127.0.0.1:27017/test?authSource=admin',{useNewUrlParser: true, useUnifiedTopology: true})


// mongoose.connect('mongodb://pomeloTestAdmin:pomeloTestAdmin@124.222.147.172:27017/pomeloTest?authSource=pomeloTest', { useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false })
 mongoose.connect('mongodb://pomeloAdmin:12dadtE43456@192.168.10.100:27017/pomeloDB?authSource=pomeloDB',{ useCreateIndex: true,useNewUrlParser: true, useUnifiedTopology: true,useFindAndModify: false})






//mongoose.connect('mongodb://192.168.10.77:27018/test/authSource=admin', {useNewUrlParser: true, useUnifiedTopology: true});
//mongoose.connect('mongodb://212.64.71.77:27017/test', {useNewUrlParser: true, useUnifiedTopology: true});
//mongoose.connect('mongodb://127.0.0.1:27017/test', {useNewUrlParser: true, useUnifiedTopology: true});
const { Schema } = mongoose;
module.exports={mongoose ,Schema}
